package marking.liu.handler;


import com.xxl.job.core.handler.annotation.XxlJob;
import marking.liu.service.StockTimerTaskService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

@Component
public class jobHandler {

    @Autowired
    private StockTimerTaskService stockTimerTaskService;

    @XxlJob("job_test")
    public void jobTest(){
        System.out.println("jobTest run.....");
    }

    /**
     * 定时采集国内大盘数据(0分 ~ 29分)
     */
    @XxlJob("market_index_info_up")
    public void marketIndexInfoUp() {
        stockTimerTaskService.getInnerMarketInfo();
    }

    /**
     * 定时采集国内大盘数据(30分 ~ 59分)
     */
    @XxlJob("market_index_info_down")
    public void marketIndexInfoDown() {
        stockTimerTaskService.getInnerMarketInfo();
    }

    /**
     * 定时采集个股数据(0分 ~ 29分)
     */
    @XxlJob("rt_info_up")
    public void rtInfoUp() {
        stockTimerTaskService.getStockRtIndex();
    }

    /**
     * 定时采集个股数据(30分 ~ 59分)
     */
    @XxlJob("rt_info_down")
    public void rtInfoDown() {
        stockTimerTaskService.getStockRtIndex();
    }
}
